import requests
from PySide2.QtWidgets import QWidget, QPushButton, QFileDialog, QVBoxLayout, QListWidget, QListView, QListWidgetItem

class TabYoukuVideo(QWidget):

    def __init__(self):
        super(TabYoukuVideo, self).__init__()
        self.setupUi()

        self.setupData()

    def setupUi(self):
        pass

    def setupData(self):
        pass
        # headers = {
        #     'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36',
        #     'Referer': 'https://so.youku.com/',
        #     'Cookie': 'UM_distinctid=17a557a4b26b50-0d468ee577ef18-1f3b6054-13c680-17a557a4b27aae; cna=+A42GSzGwmYCAbaLVuti0s0a; __ysuid=1624931716478qMf; youku_history_word=%5B%22lol%22%2C%22%25E6%25B8%25B8%25E6%2588%258F%22%5D; __aysid=1625720544264hfq; __aysvstp=9; __ayft=1625822436102; __ayscnt=1; modalFrequency={"UUID":"10"}; xlly_s=1; _m_h5_tk=b20b35e91e77d82b126e5d7546d5e4b5_1625827837966; _m_h5_tk_enc=24b2b7ef5d37b2934b97461c87413518; P_ck_ctl=64217EB93B5413BD75AE8BE730951434; __arpvid=1625823318504Ti8l7a-1625823318516; __aypstp=5; __ayspstp=10; tfstk=cERCBFjsf3dwQRDzTegaUKgy9l1la2PC72sMRKAU34w0_0KRXsDzgiaXRUqT7Ub1.; l=eBP7CJwHjbM9BOs8BO5Zhurza77TUIOf1sPzaNbMiIncC6I1Txvti8xQD1BRYd-RR8XciaYB4x4YjzwTheu_-PLjBBxp6xZa5756Cw1..; isg=BEtLnQ-tr_rQc_OGyQavGb912uk14F9it5drdL1JfQqG3Gg-RbFBs7Y6ttwyfLda',
        # }

        # # https://acs.youku.com/h5/mtop.youku.soku.yksearch/2.0/?jsv=2.5.1&appKey=23774304&t=1625822846066&sign=8ad10144809f86714991e1cc286f20cc&api=mtop.youku.soku.yksearch&type=originaljson&v=2.0&ecode=1&dataType=json&jsonpIncPrefix=headerSearch&data={"searchType":1,"keyword":"lol","pg":5,"pz":20,"site":1,"appCaller":"pc","appScene":"mobile_multi","userTerminal":2,"sdkver":313,"userFrom":1,"noqc":0,"aaid":"e4a5938c85294c31d8f490d7061392cb","ftype":0,"duration":"0-600","categories":"-7","ob":0,"utdId":"+A42GSzGwmYCAbaLVuti0s0a","userType":"guest","userNumId":0,"searchFrom":"1","sourceFrom":"home"}
        # # url = 'https://acs.youku.com/h5/mtop.youku.soku.yksearch/2.0/?jsv=2.5.1&appKey=23774304&t=1625822846066&sign=8ad10144809f86714991e1cc286f20cc&api=mtop.youku.soku.yksearch&type=originaljson&v=2.0&ecode=1&dataType=json&jsonpIncPrefix=headerSearch&data={"searchType":1,"keyword":"lol","pg":5,"pz":20,"site":1,"appCaller":"pc","appScene":"mobile_multi","userTerminal":2,"sdkver":313,"userFrom":1,"noqc":0,"aaid":"e4a5938c85294c31d8f490d7061392cb","ftype":0,"duration":"0-600","categories":"-7","ob":0,"utdId":"+A42GSzGwmYCAbaLVuti0s0a","userType":"guest","userNumId":0,"searchFrom":"1","sourceFrom":"home"}'
        # # url = 'https://acs.youku.com/h5/mtop.youku.soku.yksearch/2.0/?jsv=2.5.1&appKey=23774304&t=1625823575872&sign=ed10675913636ac05288da1dbf345257&api=mtop.youku.soku.yksearch&type=originaljson&v=2.0&ecode=1&dataType=json&jsonpIncPrefix=headerSearch&data=%7B%22searchType%22%3A1%2C%22keyword%22%3A%22lol%22%2C%22pg%22%3A5%2C%22pz%22%3A20%2C%22site%22%3A1%2C%22appCaller%22%3A%22pc%22%2C%22appScene%22%3A%22mobile_multi%22%2C%22userTerminal%22%3A2%2C%22sdkver%22%3A313%2C%22userFrom%22%3A1%2C%22noqc%22%3A0%2C%22aaid%22%3A%22f3e246ac93176388e09f4b733c7dea23%22%2C%22ftype%22%3A0%2C%22duration%22%3A%22%22%2C%22categories%22%3A%22%22%2C%22ob%22%3A%22%22%2C%22utdId%22%3A%22%2BA42GSzGwmYCAbaLVuti0s0a%22%2C%22userType%22%3A%22guest%22%2C%22userNumId%22%3A0%2C%22searchFrom%22%3A%221%22%2C%22sourceFrom%22%3A%22home%22%7D'
        # url = 'https://so.youku.com/search_video/q_1?searchfrom=1'
        # # url = "https://so.youku.com/"
        # r = requests.get(url)
        # print(r.status_code)
        # print(r.text)
